﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="BlokkeerDeBlokkeerVolger.aspx.cs" Inherits="Quaack.BlokkeerDeBlokkeerVolger" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        Blokkeer gebruiker</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="followid" DataSourceID="Quaack" OnRowCommand="GridView1_RowCommand">
            <Columns>
                <asp:BoundField DataField="followid" HeaderText="followid" InsertVisible="False" ReadOnly="True" SortExpression="followid" />
                <asp:BoundField DataField="blocked" HeaderText="blocked" SortExpression="blocked" />
                <asp:BoundField DataField="username" HeaderText="username" SortExpression="username" />
                <asp:BoundField DataField="follower" HeaderText="follower" SortExpression="follower" />
                <asp:BoundField DataField="subject" HeaderText="subject" SortExpression="subject" />
                <asp:ButtonField CommandName="BlokeerDeblokkeer" Text="BlokeerDeblokkeer" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="Quaack" runat="server" ConflictDetection="CompareAllValues" ConnectionString="<%$ ConnectionStrings:Quaack %>" DeleteCommand="DELETE FROM [follower] WHERE [followid] = @original_followid AND [blocked] = @original_blocked" InsertCommand="INSERT INTO [follower] ([blocked]) VALUES (@blocked)" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT follower.followid, follower.blocked, profile.username, follower.follower, follower.subject FROM follower INNER JOIN profile ON follower.follower = profile.profileid WHERE (follower.subject = @subject)" UpdateCommand="UPDATE [follower] SET [blocked] = @blocked WHERE [followid] = @original_followid AND [blocked] = @original_blocked">
            <DeleteParameters>
                <asp:Parameter Name="original_followid" Type="Int32" />
                <asp:Parameter Name="original_blocked" Type="Boolean" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="blocked" Type="Boolean" />
            </InsertParameters>
            <SelectParameters>
                <asp:SessionParameter DefaultValue="0" Name="subject" SessionField="userID" Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="blocked" Type="Boolean" />
                <asp:Parameter Name="original_followid" Type="Int32" />
                <asp:Parameter Name="original_blocked" Type="Boolean" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
